#pragma once

#include "IAbility.h"
#include "IEffect.h"
#include "Subject.h"
#include "Vector3D.h"

namespace Combat
{
	class Combatant
	{
	public:
		Combatant();

		IEffect::Map_t& Effects();
		void RemoveEffectsOfType( HashedString type );

		void ActivatePreAttackEffects( Response& response );
		void ActivatePreDefenseEffects( Response& response );
		void ActivatePostDefenseEffects( Response& response );
		void ActivatePostAttackEffects( Response& response );

		IAbility::Vector_t& Abilities();

		void HandleResponse( Response& response );
		Subject<int>& Health();
		Subject<int>& PhysicalDamage();
		Subject<int>& SpecialDamage();
		Subject<Maths::Vector3D>& Position();
	protected:
		Subject<int> m_health;
		Subject<int> m_physicalDamage;
		Subject<int> m_specialDamage;
		Subject<Maths::Vector3D> m_position;
		IEffect::Map_t m_effects;
		IAbility::Vector_t m_abilities;
	};
};